package com.enba.boot.mq.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties(prefix = "mq")
public class MqProperties {

  private ActiveMqProperties activemq = new ActiveMqProperties();

  private KafkaProperties kafka = new KafkaProperties();

  private RabbitmqProperties rabbitmq = new RabbitmqProperties();

  private RocketmqProperties rocketmq = new RocketmqProperties();

  @Data
  public static class ActiveMqProperties {

    /** 是否自动注册 */
    private boolean enable = false;

    /** 策略标识 */
    private String strategyKey = "activemq";
  }

  @Data
  public static class KafkaProperties {

    /** 是否自动注册 */
    private boolean enable = false;

    /** 策略标识 */
    private String strategyKey = "kafka";
  }

  @Data
  public static class RabbitmqProperties {

    /** 是否自动注册 */
    private boolean enable = false;

    /** 策略标识 */
    private String strategyKey = "rabbitmq";
  }

  @Data
  public static class RocketmqProperties {

    /** 是否自动注册 */
    private boolean enable = false;

    /** 策略标识 */
    private String strategyKey = "rocketmq";
  }
}
